
import java.io.*;
import java.util.*;

/**
 * 
 */
public class TVFactory {

    /**
     * Default constructor
     */
    public TVFactory() {
    }

    /**
     * @param String brand 
     * @return
     */
    public static TV produceTV(String brand) {
        // TODO implement here
        if(brand.equalsIgnoreCase("Haier"))
        {
            System.out.println("The TV factory is producing Haier televisions!");
            return new HaierTV();
        }
        else if(brand.equalsIgnoreCase("Hisense"))
        {
            System.out.println("The TV factory is producing Hisense televisions!");
            return new HisenseTV();
        }
        else
        {
            throw new Exception("There are currently no televisions of this brand!");
        }
    }

}